/*
 * Syntelos 'SX'
 * Copyright (C) 1998, 2007  John Pritchard.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of the
 * License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 * 02110-1301 USA.
 */
package syntelos.sx;

import alto.lang.Address;
import alto.lang.Component;
import alto.sys.Reference;

/**
 * <p> Common SX Thread features.  A real time implementation would
 * replace the super class here.  Implementors have a {@link
 * Reference} with owner "0" as transient resources. </p>
 * 
 * @see Group
 * @see Server
 * @see Service
 * @see Log
 * @author jdp
 * @since 1.6
 */
public abstract class SX
    extends syntelos.sys.Thread
{

    public final static Class CLASS_THREAD = SX.class;
    public final static Class CLASS_RESPONSE = Response.class;



    public abstract static class Daemon
        extends SX
    {
        public abstract static class Service
            extends SX
        {
            protected Service(String name){
                super(Group.Service,name);
                this.setDaemon(true);
                this.setPriority(MAX_PRIORITY);
            }
        }
        public abstract static class Log
            extends SX
        {
            protected Log(String name){
                super(Group.Log,name);
                this.setDaemon(true);
                this.setPriority(MIN_PRIORITY);
            }
        }
        public abstract static class Server 
            extends SX
        {
            protected Server(String name){
                super(Group.Server,name);
                this.setDaemon(false);
            }

        }

        protected Daemon(Group group, String name){
            super(group,name);
        }

    }

    /**
     */
    protected SX(Group group, String name){
        super(group,name);
    }


}
